package com.bayleaf.core;

import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.logging.StreamHandler;

public class BayleafLogger{
	
	private static Logger log;
	
	public static void init(String loggerName){
		log = Logger.getLogger(loggerName);
		log.setUseParentHandlers(false);
		log.addHandler(new StreamHandler(System.err, new SimpleFormatter()));
//		return this;
	}
	
	public void debug(String message){
		log.log(Level.SEVERE, message);
	}
	public void info(String message){
		log.log(Level.INFO, message);
	}
	public void error(String message){
		log.log(Level.WARNING, message);
	}
}
